<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="bp" value="${pageContext.request.contextPath}"></c:set>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html>
<head>
    <title>注册成功跳转页面</title>
</head>
<style>
    #Time,#p{
        font-size: 150px;
        text-align: center;
    }
    #Font,#p{
        font-size: 100px;
        text-align: center;
    }
</style>
<body>

<font color="yellow"><p id="Time" >5</p></font>
<p id="Font">恭喜你注册成功</p>

</body>

<script type="application/javascript">

    function countDown(){
        //获取初始时间
        var time = document.getElementById("Time");

        //获取到id为time标签中的数字时间
        if(time.innerHTML == 0){
            //等于0时清除计时，并跳转该指定页面
            window.location.href="${bp}/user/index";
        }else{
            time.innerHTML = time.innerHTML-1;
        }
    }
    //1000毫秒调用一次
    window.setInterval("countDown()",1000);

</script>
</html>
